package copyCollectionsDemo;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;

public class Demo2 {
	public static void main(String[] args){
		ArrayList<Koo> alist = new ArrayList<Koo>();
		alist.add(new Koo());
		alist.add(new Koo());
//		ArrayList<Koo> copyAlist = new ArrayList<Koo>(alist);
//		System.out.println(alist);
//		System.out.println(copyAlist);
		
//		LinkedList<Koo> copyAlist = new LinkedList<Koo>(alist);
//		System.out.println(alist);
//		System.out.println(copyAlist);
		
		HashSet<Koo> copyAlist = new HashSet<Koo>(alist);
		System.out.println(alist);
		System.out.println(copyAlist);
	}
}
class Koo{
	int num = 2;
}
